package controller;

import model.Hospede;
import dao.DAOHospede;

public class HospedeController {

	public void criarHospede(String nome, String telefone, String endereco,
			String email, long cpf) {

		Hospede h = new Hospede(nome, telefone, endereco, email, cpf);
		new DAOHospede().persist(h);
		new DAOHospede().commit();
	}

	public void excluirHospede(int id) {
		DAOHospede dh = new DAOHospede();
		Hospede h = dh.findById(id);
		dh.remove(h);
		dh.commit();
	}

	public void excluirHospede(long cpf) {
		DAOHospede dh = new DAOHospede();
		Hospede h = dh.findByCpf(cpf);
		dh.remove(h);
		dh.commit();
	}

	public Hospede findHospede() {
		return null;
	}

}
